<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Extracts a line from the front of the buffer</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="eventbuffer.readfrom.html">« EventBuffer::readFrom</a></li>
      <li style="float: right;"><a href="eventbuffer.search.html">EventBuffer::search »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.eventbuffer.html">EventBuffer</a></li>
    <li>Extracts a line from the front of the buffer</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="eventbuffer.readline" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventBuffer::readLine</h1>
  <p class="verinfo">(PECL event &gt;= 1.2.6-beta)</p><p class="refpurpose"><span class="refname">EventBuffer::readLine</span> &mdash; <span class="dc-title">Extracts a line from the front of the buffer</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventbuffer.readline-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EventBuffer::readLine</strong></span>(<span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$eol_style</code>
   </span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   Extracts a line from the front of the buffer and returns it in a newly
   allocated string. If there is not a whole line to read, the function
   returns <strong><code>null</code></strong>. The line terminator is not included in the copied string.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventbuffer.readline-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>

     <code class="parameter">eol_style</code>
    </dt>

    <dd>

     <p class="para">
      One of
      <a href="class.eventbuffer.html#eventbuffer.constants" class="link">EventBuffer:EOL_* constants</a>
      .
     </p>
    </dd>

   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventbuffer.readline-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   On success returns the line read from the buffer, otherwise <strong><code>null</code></strong>.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventbuffer.readline-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">
    <span class="methodname"><a href="eventbuffer.copyout.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::copyout()</a> - Copies out specified number of bytes from the front of the buffer</span>
   </li>
   <li class="member">
    <span class="methodname"><a href="eventbuffer.drain.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::drain()</a> - Removes specified number of bytes from the front of the buffer
  without copying it anywhere</span>
   </li>
   <li class="member">
    <span class="methodname"><a href="eventbuffer.pullup.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::pullup()</a> - Linearizes data within buffer
  and returns it's contents as a string</span>
   </li>
   <li class="member">
    <span class="methodname"><a href="eventbuffer.read.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::read()</a> - Read data from an evbuffer and drain the bytes read</span>
   </li>
   <li class="member">
    <span class="methodname"><a href="eventbuffer.appendfrom.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::appendFrom()</a> - Moves the specified number of bytes from a source buffer to the
  end of the current buffer</span>
   </li>
  </ul>
 </div>

</div></div></div></body></html>